<!DOCTYPE html>
<html>
<head>
<base href="${basePath}">
<meta charset="UTF-8">
<title>创建组</title> $!{include("import_js_css.html")}
<link rel="stylesheet" type="text/css"
	href="/yueyoga_all2014/app/admin/resources/css/basic.css" />
</head>
<body>
	$!{include("header.html")}
	<div class="menu_all">
		<div class="div_search_result clear">
			<div class="panel-heading" style="background: #E9E9E9;">
				<h3 class="panel-title">创建组</h3>
			</div>
			<div class="panel-form-add">
				<form class="form-horizontal" action="yueyogaAdmin/addGroupUser.jhtml" method="POST">
					<div class="panel-form-layout">
						<label for="txtUserEnName" class="col-sm-1 control-label">英文名字</label>
						<div class="col-sm-3">
							<input type="text" class="form-control" name="userEnName" required
								id="txtUserEnName" value="${enName}" >
						</div>
						<label for="txtUserChName" class="col-sm-1 control-label">中文名字</label>
						<div class="col-sm-3">
							<input type="text" class="form-control" name="userChName" required
								id="txtUserChName" value="${chName}" >
						</div>
						<br /> <br />
						
						<label for="txtUserEnabled"
							class="col-sm-1 control-label">是否启用</label>
						<div class="col-sm-3">
							<select class="selectpicker show-menu-arrow" data-width="100%"
								name="enabled" id="txtUserEnabled">
								<option value="1" selected>启用</option>
								<option value="0">禁用</option>
							</select>
						</div>
						<br /> <br />
						
						
						<label for="txtUserdescription"
							class="col-sm-1 control-label">描述</label>
						<div class="col-sm-3">
							<textarea class="form-control panel-form-address" style="width: 855px;" name="description" id="txtUserdescription" ></textarea>
						</div>
						<br /> <br /><br /> <br />
						<div class="panel-btn-search">
							<button type="submit" class="btn btn-default btn-ade-default panel-mr">保存</button>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
	
	<script type="text/javascript">
		function documentReady() {
			var msg = "${msg}";
			if (msg == "success") {
				var d = alert("添加成功");
				setTimeout(function() {
					d.close().remove();
					window.location.href = "yueyogaAdmin/searchGroupUsers.jhtml";
				}, 1000);
			} else if (msg == "failure") {
				error("添加失败");
			}else if(msg == "yicunzai"){
				alert("该英文名称已存在!");
			}else if(msg == "chyicunzai"){
				alert("该中文名称已存在!");
			}
			
			$("#txtUserEnabled").select2({
				width: "100%",
				minimumResultsForSearch: -1
			});
		}
	
		$(function() {
			$("#selTaskType").change(function() {
				var taskType = $(this).val();
				if (taskType == 2) {
					$("#ta_mbr_div").hide();
					$("#ta_gps_div").show();
				} else {
					$("#ta_gps_div").hide();
					$("#ta_mbr_div").show();
				}
			});
			//--
			$(".form_datetime").datetimepicker({
				minView : "month",
				language : "zh-CN",
				format : "yyyy-mm-dd",
				showMeridian : true,
				autoclose : true,
				todayBtn : true,
				pickerPosition : "bottom-left"
			});
		});
	</script>
</body>
</html>